package xyc.szk.sjxy.servlet;/*
 * 作者：zjLiu
 * 日期：2021-05-26
 * 公司：数学与计算机学院
 */

import com.sun.xml.internal.ws.resources.HttpserverMessages;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.function.DoublePredicate;

@WebServlet("/logout")
public class Logout  extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
       //登出
       req.getSession().invalidate();  //销毁session对象
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doGet(req,resp);
    }
}
